package com.upb.webserver.dao.entity;

import com.upb.webserver.common.enums.PlatformEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;

@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode
public class TbHost implements Serializable {

    public TbHost(Integer companyId) {
        this.companyId = companyId;
    }

    public TbHost(Integer companyId, Integer orgId) {
        this.companyId = companyId;
        this.orgId = orgId;
    }

    public TbHost(String hostIp, Integer orgId) {
        this.ip = hostIp;
        this.orgId = orgId;
    }

    public TbHost(PlatformEnum platformEnum, int creatorAccountId) {
        this.createFromPlatform = platformEnum.getId();
        this.createBy = creatorAccountId;
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.id
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.org_id
     *
     * @mbg.generated
     */
    private Integer orgId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.company_id
     *
     * @mbg.generated
     */
    private Integer companyId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.ip
     *
     * @mbg.generated
     */
    private String ip;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.ssh_user
     *
     * @mbg.generated
     */
    private String sshUser;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.ssh_port
     *
     * @mbg.generated
     */
    private Integer sshPort;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.root_dir
     *
     * @mbg.generated
     */
    private String rootDir;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.min_port
     *
     * @mbg.generated
     */
    private Integer minPort;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.max_port
     *
     * @mbg.generated
     */
    private Integer maxPort;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.docker_port
     *
     * @mbg.generated
     */
    private Integer dockerPort;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.already_used_port_max
     *
     * @mbg.generated
     */
    private Integer alreadyUsedPortMax;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.status
     *
     * @mbg.generated
     */
    private Byte status;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.create_from_platform
     *
     * @mbg.generated
     */
    private Byte createFromPlatform;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.create_by
     *
     * @mbg.generated
     */
    private Integer createBy;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.gmt_create
     *
     * @mbg.generated
     */
    private Date gmtCreate;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_host.gmt_modified
     *
     * @mbg.generated
     */
    private Date gmtModified;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table tb_host
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;
}
